<?php $this->_extends('../_layouts/blank_layout'); ?>
<?php $this->_block('contents'); ?>
<?foreach ($purchase_order as $p):?>
类型：<?=Helper_BSS_Normal::getIniOne('purchase_order_type', 'value', $p['type'], 'name')?>&nbsp;&nbsp;&nbsp;&nbsp;
单号：<?=$p['number']?>&nbsp;&nbsp;&nbsp;&nbsp;
仓库：<?=$p['warehouse_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
日期：<?=$p['purchase_time']?>
<table class="print_table">
<tr>
	<th width="400">产品</th>
	<th width="50">实际数</th>
	<th width="50">待发数</th>
	<th width="60">架位</th>
	<th width="150">备注</th>
</tr>
<?$total_qty=$total_sqty=0;?>
<?foreach ($p['item'] as $i):?>
<?$total_qty += $i['actual_quantity'];?>
<?$total_sqty += $i['sold_quantity'];?>
<tr>
	<td><?=$i['product_number']?>&nbsp;<?=$i['product_name']?></td>
	<td align="center"><?=$i['actual_quantity']?></td>
	<td align="center"><?=$i['sold_quantity']?></td>
	<td align="center"><?=$i['shelf_position']?></td>
	<td><?=$i['notes']?></td>
</tr>
<?endforeach;?>
<tr>
	<td align="right"><b>总计：</b></td>
	<td align="center"><b><?=$total_qty?></b></td>
	<td align="center"><b><?=$total_sqty?></b></td>
	<td colspan="2"><b><span style="float: right;">总价：<?=sprintf('%.2f',$p['actual_amount'])?></span></b></td>
</tr>
</table>
备注：<?=$p['notes']?>
<br />
制单人：<?=$p['make_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
经手采购员：<?=$p['purchase_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
采购审核：<?=$p['purchase_audit_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
采购完成：<?=$p['complete_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
确认到仓：<?=$p['arrive_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
确认发送：<?=$p['send_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
仓库审核：<?=$p['storage_audit_user_name']?>
<div class="PageNext"></div>
<?endforeach;?>
<?php $this->_endblock();?>